In [1]:
import os
def calc_speed(t=None, dpi=None):
frequency = 1/t
pixel_pitch = 25.4 / dpi # mm
speed = pixel_pitch*frequency /1000*60 # m/min
print("Waveform length = {} sec".format(t))
print("Max Frequency = {} kHz".format(frequency/1000))
print("Speed = {} m/min{}".format(speed, os.linesep))
print("With Max Waveform size")
waveform_length = 50.0e-6 # sec
dpi = 150.0 # dpi
calc_speed(waveform_length, dpi)
print("With your defined Waveform size")
waveform_length = 37.4e-6 # sec
dpi = 150.0 # dpi
calc_speed(waveform_length, dpi)
print("With your existing errornous Waveform size")
waveform_length = 200.0e-6 # sec
dpi = 150.0 # dpi
calc_speed(waveform_length, dpi)